<h2>我的雄们heroes</h2>
<ul class="heroes">
  <li *ngFor="let hero of heroes" 
  [class.selected]="hero === selectedHero"
  (click)="onSelect(hero)">
    <span class="badge">{{hero.id}}</span>{{hero.name}}
   	<button class="delete"
  	(click)="delete(hero); $event.stopPropagation()">x</button>
  </li>
</ul>
<div *ngIf="selectedHero">
  <h2>
    {{selectedHero.name | uppercase}} 是我的偶像
  </h2>
  <button (click)="gotoDetail()">查看详情</button>
</div>
<div>
  <label>Hero name:</label> <input #heroName />
  <button (click)="add(heroName.value); heroName.value=''">
    增加
  </button>
</div>